package it.polimi.TravelDream;

import java.io.Serializable;

import javax.persistence.*;


/**
 * The persistent class for the basepackexlinker database table.
 * 
 */
@Entity
@NamedQueries({
	@NamedQuery(name="Basepackexlinker.findAll", query="SELECT p FROM Basepackexlinker p"),
	@NamedQuery(name="Basepackexlinker.eliminateByPack", query="DELETE FROM Basepackexlinker bpel WHERE bpel.basepackage.id = :param" ),
	@NamedQuery(name="Basepackexlinker.findByPack", query="SELECT bpel FROM Basepackexlinker bpel WHERE bpel.basepackage.id LIKE :param" )})

public class Basepackexlinker implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private BasepackexlinkerPK id;

	//bi-directional many-to-one association to Excursion
	@ManyToOne
	@JoinColumn(name="ExcursionID")
	private Excursion excursion;

	//bi-directional many-to-one association to Basepackage
	@ManyToOne
	@JoinColumn(name="PackageID")
	private Basepackage basepackage;

	public Basepackexlinker() {
	}

	public BasepackexlinkerPK getId() {
		return this.id;
	}

	public void setId(BasepackexlinkerPK id) {
		this.id = id;
	}

	public Excursion getExcursion() {
		return this.excursion;
	}

	public void setExcursion(Excursion excursion) {
		this.excursion = excursion;
	}

	public Basepackage getBasepackage() {
		return this.basepackage;
	}

	public void setBasepackage(Basepackage basepackage) {
		this.basepackage = basepackage;
	}

}